//
//  SJAuthView.m
//  SJPay
//
//  Created by 凯朱 on 2024/11/28.
//

#import "SJAuthView.h"

@implementation SJAuthView
-(void)awakeFromNib{
    [super awakeFromNib];
    _tipLbl1.text = kLocalString(@"上传身份证件照片");
    _tipLbl2.text = kLocalString(@"证件正面");
    _tipLbl3.text = kLocalString(@"请保持照片中证件显示完整， 字体清晰且无反光");
    _tipLbl4.text = kLocalString(@"证件反面");
    _tipLbl5.text = kLocalString(@"请保持照片中证件显示完整， 字体清晰且无反光");
    _tipLbl6.text = kLocalString(@"手持身份证拍照");
    _tipLbl7.text = kLocalString(@"请保持照片中证件显示完整， 字体清晰且无反光");
    _tipLbl8.text = kLocalString(@"必须允许使用相机权限才能拍照，否则无法进行下一步。");
    _tipLbl9.text = kLocalString(@"个人信息认证");
    _tipLbl10.text = kLocalString(@"姓名：");
    _tipLbl11.text = kLocalString(@"性别：");
    _tipLbl12.text = kLocalString(@"出生日期：");
    _tipLbl13.text = kLocalString(@"证件号码：");
    _tipLbl14.text = kLocalString(@"声明");
    _tipLbl15.text = kLocalString(@"1. 请确保以上信息填写准确，否则将无法获取贷款");
    _tipLbl16.text = kLocalString(@"2. 如未成功申请到贷款，一周后将删除您的个人信息，确保信息 安全。");
    _tf1.placeholder = kLocalString(@"请输入您的姓名");
    _tf2.placeholder = kLocalString(@"请选择性别");
    _tf3.placeholder = kLocalString(@"请选择出生日期");
    _tf4.placeholder = kLocalString(@"请输入证件号码");
    [_nextBtn setTitle:kLocalString(@"下一步") forState:UIControlStateNormal];
    
    _tf2.userInteractionEnabled = NO;
    _tf3.userInteractionEnabled = NO;
    
    _bgView3.layer.cornerRadius = 5;
    _bgView3.layer.masksToBounds = YES;
    _bgView4.layer.cornerRadius = 5;
    _bgView4.layer.masksToBounds = YES;
    
    _bgView1.layer.cornerRadius = 5;
    _bgView1.layer.masksToBounds = YES;
    _bgView1.layer.borderWidth = 1.5;
    _bgView1.layer.borderColor = kHexColor(@"#C0C9EC").CGColor;
    
    _nextBtn.layer.cornerRadius = 25;
    _nextBtn.layer.masksToBounds = YES;
    
    _bgView12.layer.cornerRadius = 5;
    _bgView12.layer.masksToBounds = YES;
    _bgView12.layer.borderWidth = 1.5;
    _bgView12.layer.borderColor = kHexColor(@"#C0C9EC").CGColor;
    
    kWeakSelf(self);
    _btn1.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
        if (weakself.btnBlock) {
            weakself.btnBlock(1);
        }
    }];
    [_btn1 addGestureRecognizer:tap1];
   
    _btn2.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap2 = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
        if (weakself.btnBlock) {
            weakself.btnBlock(2);
        }
    }];
    [_btn2 addGestureRecognizer:tap2];
    
    _btn3.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap3 = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
        if (weakself.btnBlock) {
            weakself.btnBlock(3);
        }
    }];
    [_btn3 addGestureRecognizer:tap3];
    
    _btn4.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap4 = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
        if (weakself.btnBlock) {
            weakself.btnBlock(4);
        }
    }];
    [_btn4 addGestureRecognizer:tap4];
    
    _btn5.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap5 = [[UITapGestureRecognizer alloc] initWithActionBlock:^(id  _Nonnull sender) {
        if (weakself.btnBlock) {
            weakself.btnBlock(5);
        }
    }];
    [_btn5 addGestureRecognizer:tap5];
}


- (IBAction)nextAction:(id)sender {
    if (self.btnBlock) {
        self.btnBlock(6);
    }
}

@end
